SyncChnInfo
Function
This API is used by the hot standby management device to synchronize channel information of the working device to a regular hot standby device. Upon receiving this information, the hot standby device will add these devices and take over the video recording duties of the working device.
Request Message
Parameter Description
Table 1
Parameter | Range | Type | Description |
---|---|---|---|
worker_ip | string | The IP address of the working device. | |
worker_mac | string | The MAC address of the working device. | |
channels | "All" "CH1"…"CHx" "IP_CH1"…"IP_CHx" "WIFI_CH1"…"WIFI_CHx" | object | For detailed information, please refer to Table 2. |
Table 2
Parameter | Range | Type | Description |
---|---|---|---|
enable | bool | Whether to enable the channel. | |
channel_index | int | Channel number of the frontend device. | |
protocol | string | ||
connect_method | "General", "Security" | string | "General": Prefer HTTP "Security": Prefer HTTPS |
camera_mode | "Auto", "Normal" | string | Camera mode. |
main_url | string | The url of the main stream when connecting using rtsp. | |
sub_url | string | The url of the substream when connecting using rtsp. | |
ip | string | ||
username | string | ||
peer_key | string | ||
cipher | string | Encrypted password. | |
seq | int | ||
port | int |
Sample:
POST /API/RecordPatch/SyncChnInfo HTTP/1.1
{
"data":{
"worker_ip": 172.16.11.34,
"worker_mac": "xx-xx-xx-xx-xx-xx",
"channels": {
"CH1": {
"enable": true,
"channel_index": 0,
"protocol": "Private",
"connect_method": "General",
"camera_mode": "Auto",
"main_url": "",
"sub_url": "",
"ip": "172.16.11.50",
"username": "admin",
"peer_key": "07uKqG8PGyqWLbqt7vN18Rqg4p17+UfRmcZAZQ0NKDAc=",
"cipher": "0XfBrLSeFZiEFjNl0tiMauJ/aWDkuTvDXHextl1fZrgppV4KEUw==",
"seq": 0,
"port": 80
}
}
}
}
Response Message
None
Sample:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success"
}